package com.htgd.gardenexpo.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.github.pagehelper.PageInfo;
import com.htgd.gardenexpo.dto.BindingBraceletDTO;
import com.htgd.gardenexpo.dto.CompetitionDTO;
import com.htgd.gardenexpo.dto.GeConUserCompeteDTO;
import com.htgd.gardenexpo.dto.PostSportsDataDTO;
import com.htgd.gardenexpo.entity.CommonResult;
import com.htgd.gardenexpo.entity.GeConUserCompete;
import com.htgd.gardenexpo.page.CompeteQuery;
import com.htgd.gardenexpo.page.CompeteUserQuery;
import com.htgd.gardenexpo.vo.GeConUserCompeteVO;
import com.htgd.gardenexpo.vo.MySportsDataVO;

import javax.crypto.NoSuchPaddingException;
import javax.servlet.http.HttpServletRequest;
import java.security.NoSuchAlgorithmException;
import java.security.NoSuchProviderException;
import java.util.HashMap;

/**
 * @author: 王秀田
 * @date: 2024/11/29 13:17
 * @description: TODO
 */
public interface GeConUserCompeteService extends IService<GeConUserCompete> {

    PageInfo<HashMap> pageList(CompeteQuery competeQuery);

    CommonResult add(GeConUserCompeteDTO geConUserCompete, HttpServletRequest request);

    /**
     * 开始比赛
     */
    void startCompetition(CompetitionDTO competition,HttpServletRequest request)throws Exception;

    /**
     * 结束比赛
     */
    void endContest(CompetitionDTO competition,HttpServletRequest request)throws Exception;

    /**
     * 我的运动 数据
     * @param openId
     */
    MySportsDataVO mySportsData(String encryptedData, String iv,String code,String sessionKey,String openId) throws Exception;

    void updateUserCompete( GeConUserCompete geConUserCompete);

    PageInfo<GeConUserCompeteVO> listNew(CompeteUserQuery competeUserQuery);

    CommonResult postSportsData(PostSportsDataDTO postSportsDataDTO);

    CommonResult bindingBracelet(BindingBraceletDTO bindingBraceletDTO);

    CommonResult queryScores(String id);
}
